#基础镜像
FROM openjdk:8-alpine
#维护者信息
LABEL version="1.0" maintainer="qianq <qianq@xi-data.com>"
#修正时区
RUN apk --no-cache add tzdata  && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    rm -rf /var/cache/apk/* && \
    echo "Asia/Shanghai" > /etc/timezone
RUN apk update && apk add bash

#添加java程序
VOLUME /tmp
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
COPY start.sh /
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]
